#include "md_ver_1_0.h"


void MDVer1_0::CalculateStride()
{
	switch(format)
	{
	case MDF_N3F_V3F:
		stride = sizeof(MDF_S_N3F_V3F);
		break;
	case MDF_T2F_N3F_V3F:
		stride = sizeof(MDF_S_T2F_N3F_V3F);
		break;
	case MDF_V3F:
		stride = sizeof(MDF_S_V3F);
		break;
	}
}
MDVer1_0::MDVer1_0():ModelData()
{
	modelDataVersion = MD_VER_1_0;

}
MDVer1_0::~MDVer1_0()
{

}

MDVer1_0::MDVer1_0(void *dataPtr, int dataSize, int f, void *_meshes, int _totalMeshes, int _primitive)
{
	modelDataVersion = MD_VER_1_0;

	data = dataPtr;
	size = dataSize;
	format = f;
	meshes = (MDv1_0_Mesh *)_meshes;
	totalMeshes = _totalMeshes;
	primitive = _primitive;

	CalculateStride();
}
